package com.angel.shiro;

import org.apache.shiro.authc.UsernamePasswordToken;

/**
 * 用户和密码（包含验证码）令牌类
 */
public class UserNamePasswordToken extends UsernamePasswordToken {
    private static final long serialVersionUID = 1L;

    /**
     * 登录的用户类型
     * 假设1是user表登录的
     * 2是admin表登录的
     */
    private String userType;

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public UserNamePasswordToken() {
        super();
    }

    public UserNamePasswordToken(String username, char[] password,
                                 boolean rememberMe, String host) {
        super(username, password, rememberMe, host);
    }

    public UserNamePasswordToken(String username, char[] password,
                                 boolean rememberMe, String host, String userType) {
        super(username, password, rememberMe, host);
        this.userType=userType;
    }
}
